package org.streets.eis.ext.analysis.internal;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Hashtable;
import java.util.List;
import java.util.Map;


public class SqlStruct implements Serializable {		
	private static final long serialVersionUID = 1L;

	public final static String SUB_QUERY_NAME_PREFIX = "subselect";
	public String sql;
	public String select;
	public String where;
	public String orderby;	
	public String from;
	public List<String> fieldNames;    
	public Map<String,String> tableNamesMap;//【Key:tableName;value:alias】
	
	public String replacedFrom;
	public Map<String,String> replacementMap;
	public SqlStruct parent;
	public List<SqlStruct> fromChildren;//from子句里的子查询
	public Integer level;
	public String alias;//别名
	
	public SqlStruct(){
		fieldNames = new ArrayList<String>();
		fromChildren = new ArrayList<SqlStruct>();
		tableNamesMap = new Hashtable<String,String>();
		replacementMap = new Hashtable<String,String>();
	}
	
	public void setSql(String s){
		sql = s;
	}
	
	
	

	
}
